// AWTKeyEvent.h: interface for the AWTKeyEvent class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_AWTKEYEVENT_H__DC9C0D31_40B4_11D2_A3F1_006097A44215__INCLUDED_)
#define AFX_AWTKEYEVENT_H__DC9C0D31_40B4_11D2_A3F1_006097A44215__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "AWTEvent.h"
#include "AWTInputEvent.h"

#define KEY_FIRST 400

class AFX_EXT_CLASS AWTKeyEvent : public AWTInputEvent  
{
DECLARE_DYNAMIC(AWTKeyEvent)
public:
	AWTKeyEvent(AWTObject* source, int id, long when, int modifiers,
		          int keyCode, TCHAR keyChar);
	virtual ~AWTKeyEvent();

	enum {
		KEY_TYPED = KEY_FIRST,
		KEY_PRESSED,
		KEY_RELEASED};

	TCHAR getKeyChar()
		{return m_keyChar;}
	int getKeyCode()
		{return m_keyCode;}
	BOOL isActionKey()
		{return FALSE;}
	void setKeyChar(TCHAR c)
		{m_keyChar = c;}
	void setKeyCode(int c)
		{m_keyCode = c;}


protected:
	int m_keyCode;	
	TCHAR m_keyChar;	
};

#endif // !defined(AFX_AWTKEYEVENT_H__DC9C0D31_40B4_11D2_A3F1_006097A44215__INCLUDED_)
